package com.example.myspringframework.beans.factory.support;

import com.example.myspringframework.beans.BeansException;
import com.example.myspringframework.beans.factory.config.BeanDefinitionRegistry;
import com.example.myspringframework.core.io.Resource;
import com.example.myspringframework.core.io.ResourceLoader;

/**
 * 加载BeanDefinition的接口
 */
public interface BeanDefinitionReader {
	/**
	 * 获取BeanDefinition注册器
	 */
	BeanDefinitionRegistry getBeanDefinitionRegistry();

	/**
	 * 获取资源加载器
	 */
	ResourceLoader getResourceLoader();

	/**
	 * 根据不同的资源类型加载BeanDefinition
	 */
	void loadBeanDefinitions(Resource resource) throws BeansException;

	void loadBeanDefinitions(String location) throws BeansException;

	void loadBeanDefinitions(String[] locations) throws BeansException;
}
